home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
tclMotif-1.4
/
programs
/
prog69
< prev
next >
Wrap
Text File
|
1995-06-29
|
675b
|
31 lines
# SpinButton
proc changedSpin {reason pos cross value} {
puts stdout "reason: $reason, position: $pos, crossed: $cross, value: $value"
}
proc changedText {reason ptr} {
puts stdout "Text change, reason: $reason, ptr: $ptr"
}
xtAppInitialize -class Program
xmSpinBox .spin managed
# -values {Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}
xmText .spin.text managed \
-position 4 \
-minimumValue 1 \
-maximumValue 31 \
-spinBoxChildType numeric \
-editable false
.spin.text valueChangedCallback {changedText %reason %ptr}
.spin valueChangedCallback \
{changedSpin %reason %position %crossed_boundary {%value}}
. realizeWidget
. mainLoop